﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net.Sockets;


namespace SGS.Standard
{
    public class Player // : IPlayer
    {
        public string UniqueID
        {
            get;
            protected set;
        }

        public Player()
        {
            UniqueID = System.Guid.NewGuid().ToString( "N" );
        }

        public Player( string name )
            :this()
        {
            Name = name;
            // Socket.Receive(null, 4, SocketFlags.None);
        }

        public string Name
        {
            get;
            set;
        }

        public string PlayerName
        {
            get 
            {
                if (GameInfo == null)
                {
                    return Name;
                }
                else
                {
                    return string.Format( "{0}-{1}", Name, GameInfo.SelectedCharacter.Name );
                }
            }
        }

        public PlayerGameInfo GameInfo
        {
            get;
            set;
        }

        public List<Player> AsList()
        {
            return new List<Player>() { this };
        }

        public Socket Socket
        {
            get;
            set;
        }
    }
}
